home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11047 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: dawn.mmm.com!news
  2. From: kjhopps@mmm.com (Kevin J Hopps)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: Calling System Command in SUN C
  5. Followup-To: comp.lang.c,comp.lang.c++
  6. Date: 12 Mar 1996 14:26:40 GMT
  7. Organization: 3M - St. Paul, MN  55144-1000 US
  8. Message-ID: <4i41j0$8nu@dawn.mmm.com>
  9. References: <4i1hlu$asm@ni1.ni.net>
  10. Reply-To: kjhopps@mmm.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Ed Thomson (ethomson@cinahl.com) wrote:
  14. > I was wondering if anyone could help me with this problem.
  15.  
  16. > I am new to SUN C and am using version 3.0.1.
  17.  
  18. > I would like to execute a system command such as mail or a shell
  19. > script I have generated and was wondering if anyone knew of an easy
  20. > way to do this within C.
  21.  
  22. The system(3S) function does what you want.  You pass it a string
  23. which is the command to execute.  It returns the exit status of
  24. the command.
  25. --
  26. Kevin J. Hopps, 3M Company     kjhopps@mmm.com
  27. Opinions are my own.  I don't speak for 3M.
  28.     But 3M speaks for me -- I did not write the following line:
  29.  
  30. Opinions expressed herein are my own and may not represent those of 3M.
  31.